/**
 * 以下路由需要登录后才可访问
 */
// import Manage from "../views/Manage.vue";
// import GoodsList from '../views/goods/List.vue'
// import AddGoods from '../views/goods/Add.vue'
import Manage from '../views/Manage.vue'
import Home from '@/views/Home.vue'
import GoodsList from '@/views/goods/List.vue'
import AddGoods from '@/views/goods/Add.vue'
import UserList from '@/views/user/List.vue'
import AddUser from '@/views/user/Add.vue'
import Order from '@/views/Order.vue'

export default {
    path:'/manage',
    component:Manage,
    name:'Manage',
    children:[
        {
            path:'',
            redirect:{
                name:'Home'
            }
        },
        {
            path:'home',
            name:'Home',
            component:Home,
        },
        // {
        //     path:'goods',
        //     children:[
                // /manage/goods -> /manage/goods/list
                {
                    path:'goods',
                    redirect:{name:'GoodsList'}
                },
                {
                    path:'goods/list',
                    name:'GoodsList',
                    component:GoodsList
                },
                {
                    path:'goods/add',
                    name:'AddGoods',
                    component:AddGoods
                },
                {
                    path:'goods/edit',
                    name:'EditGoods',
                    component:AddGoods
                },
        //     ]
        // },
       
        {
            path:'user',
            redirect:{name:'UserList'}
        },
        {
            path:'user/list',
            name:'UserList',
            component:UserList
        },
        {
            path:'user/add',
            name:'AddUser',
            component:AddUser
        },
        {
            path:'user/edit',
            name:'EditUser',
            component:AddUser
        },
        {
            path:'order',
            name:'EditUser',
            component:Order
        }
    ]
}
